BigDFT.PointParticles module

This module contains operations for the treatment of quantities related to particles in space.

distance_matrix(X)[source]

Extract the distance matrix of a array of positions with euclidean metric.

Parameters:

X (array) – array of the positions of the system

Returns:

matrix of distances in squareform

Return type:

matrix-like

Warning

The distance provided here is meaningful only in isolated boundary conditions

inverse_distance_matrix(Rab)[source]

Calculate the inverse distance matrix, with zeros on the diagonal

Parameters:

Rab (matrix-like) – matrix of the atomic distances in squareform

Returns:

inverse distance matrix, with diagonal values set to 0

Return type:

matrix-like

electrostatic_energies_matrix(X, Rm1, Q, P)[source]

Extract the matrix of the electrostatic energies of atoms described By their positions, charges and dipoles

Parameters:
  • X (array) – the array of the atom positions

  • Q (array) – charge monopoles of the atoms (total)

  • P (array) – array of the dipoles, in Px,Py,Pz convention

  • Rm1 (matrix) – inverse distance matrix of the positions

Returns:

matrix of the electrostatic energies per atom pair

Return type:

matrix

Warning

This energy is meaningful only for isolated boundary conditions

long_range_energy_matrix(X, Rm1, Z, Q, P)[source]

Extract the matrix of the electrostatic energies of atoms described By their positions, charges and dipoles

Parameters:
  • X (array) – the array of the atom positions

  • Q (array) – charge monopoles of the electrons

  • Z (array) – charge monopole of the ions

  • P (array) – array of the dipoles, in Px,Py,Pz convention

  • Rm1 (matrix) – inverse distance matrix of the positions

Returns:

matrix of the electrostatic energies per atom pair

Return type:

matrix

Warning

This energy is meaningful only for isolated boundary conditions

electrostatic_energy_dict(E, slicing)[source]

Dictionary of the electrostatic energies starting from a slicing defining the blocks of atom to be considered

Parameters:
  • E (matrix) – electrostatic_energies_matrix of the atoms

  • slicing (dict) – slicing of the fragments, given for example by py:meth:~BigDFT.Systems.System.dataframe_slicing

Returns:

dictionary of the electrostatic interaction per blocks

Return type:

dict

class PointParticles(X, Z=None, Q=None, P=None)[source]

An object storing the point particle information

Parameters:
  • X (array) – array of atomic positions

  • Q (array) – charge monopoles of the electrons

  • Z (array) – charge monopole of the ions

  • P (array) – electrostatic dipoles

property R

Distance matrix between point PointParticles

property Rm1

Inverse Distance matrix

property Eel

Matrix of the pair atomic electrostatic energies

property Elr

Matrix of the long range energy

Eel_dict(slicing)[source]

Dictionary of the electrostatic energies given a slicing defining the groups of atoms to gather

Elr_dict(slicing)[source]

Dictionary of the electrostatic energies given a slicing defining the groups of atoms to gather